package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.move.MoveOldmanIeType;
import com.csun.cmny.provider.model.move.MoveOldmanTypeIetype;
import com.csun.cmny.provider.model.move.MoveUserType;
import com.csun.cmny.provider.service.hystrix.OmcDataMoveFeighHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "cmny-provider-omc", configuration = OAuth2FeignAutoConfiguration.class, fallback = OmcDataMoveFeighHystrix.class)
public interface OmcDataMoveFeighApi {

    /*
    * 迁移人员类别
    * */
    @PostMapping(value = "/api/move/moveOldmanTypeToCmny")
    int moveOldmanTypeToCmny(@RequestBody List<MoveUserType> moveUserTypeList);

    /*
    * 迁移减免比例
    * */
    @PostMapping(value = "/api/move/movePeopleTypeSubstractRate")
    Wrapper<Integer> movePeopleTypeSubstractRate(@RequestBody List<MoveOldmanTypeIetype> ntOldmanTypeIetypeList);

    /*
     * 初始化费用配置
     * */
    @PostMapping(value = "/api/move/initExpenseConfig")
    Wrapper<Integer> initExpenseConfig(@RequestParam("groupIdList") List<Long> groupIdList);

    /*
    * 迁移入院数据
    * */
    @PostMapping(value = "/api/move/moveOldmanIn")
    Wrapper<Integer> moveOldmanIn(@RequestBody MoveOldmanIeType oldmanIeType);

    /*
    * 迁移老人入院项目
    * */
    @PostMapping(value = "/api/move/moveOldmanInItem")
    Wrapper<Integer> moveOldmanInItem(@RequestBody MoveOldmanIeType oldmanIeType);
}
